<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: orders_edit_address.php 78 2013-09-21 12:02:20Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 78 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-21 12:02:20 +0000 (Sat, 21 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

if($_GET['edit_action'] == 'address'){
	if(!$_GET['oID'])
		$_GET['oID'] = $_POST['oID'];
	$order = new order($_GET['oID']);
	
	echo draw_form('adress_edit', FILENAME_ORDERS_EDIT, 'action=address_edit', 'post');
	echo draw_hidden_field('oID', $_GET['oID']);
	echo draw_hidden_field('cID', $order->customer['ID']);
	?>
		<table width="100%" cellpadding="2">
			<tr class="dataTableHeadingRow">
				<td class="dataTableHeadingContent" width="10%" align="left">&nbsp;</td>
				<td class="dataTableHeadingContent" width="30%" align="left"><?php echo TEXT_INVOICE_ADDRESS;?></td>
				<td class="dataTableHeadingContent" width="30%" align="left"><?php echo TEXT_SHIPPING_ADDRESS;?></td>
				<td class="dataTableHeadingContent" width="30%" align="left"><?php echo TEXT_BILLING_ADDRESS;?></td>
			</tr>
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left">
					<?php echo TEXT_COMPANY;?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('customers_company', $order->customer['company']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('delivery_company', $order->delivery['company']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('billing_company', $order->billing['company']);?>
				</td>
			</tr>
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left">
					Vorname:
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('customers_firstname', $order->customer['firstname']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('delivery_firstname', $order->delivery['firstname']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('billing_firstname', $order->billing['firstname']);?>
				</td>
			</tr>
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left">
					Nachname
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('customers_lastname', $order->customer['lastname']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('delivery_lastname', $order->delivery['lastname']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('billing_lastname', $order->billing['lastname']);?>
				</td>
			</tr>
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left">
					<?php echo TEXT_STREET;?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('customers_street_address', $order->customer['street_address']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('delivery_street_address', $order->delivery['street_address']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('billing_street_address', $order->billing['street_address']);?>
				</td>
			</tr>
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left">
					<?php echo TEXT_ZIP;?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('customers_postcode', $order->customer['postcode']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('delivery_postcode', $order->delivery['postcode']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('billing_postcode', $order->billing['postcode']);?>
				</td>
			</tr>
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left">
					<?php echo TEXT_CITY;?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('customers_city', $order->customer['city']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('delivery_city', $order->delivery['city']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('billing_city', $order->billing['city']);?>
				</td>
			</tr>
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left">
					<?php echo TEXT_COUNTRY;?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('customers_country', $order->customer['country']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('delivery_country', $order->delivery['country']);?>
				</td>
				<td class="dataTableContent" align="left">
					<?php echo draw_input_field('billing_country', $order->billing['country']);?>
				</td>
			</tr>
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left" colspan="4">&nbsp;</td>
			</tr>
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left">
					<?php echo TEXT_CUSTOMER_GROUP;?>
				</td>
				<td class="dataTableContent" align="left" colspan="3">
					<?php echo draw_pull_down_menu('customers_status', get_customers_statuses(), $order->info['status']);?>
				</td>
			</tr>
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left">
					<?php echo TEXT_CUSTOMER_EMAIL;?>
				</td>
				<td class="dataTableContent" align="left" colspan="3">
					<?php echo draw_input_field('customers_email_address', $order->customer['email_address']);?>
				</td>
			</tr>
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left">
					<?php echo TEXT_CUSTOMER_TELEPHONE;?>
				</td>
				<td class="dataTableContent" align="left" colspan="3">
					<?php echo draw_input_field('customers_telephone', $order->customer['telephone']);?>
				</td>
			</tr>
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left">
					<?php echo TEXT_CUSTOMER_UST;?>
				</td>
				<td class="dataTableContent" align="left" colspan="3">
					<?php echo draw_input_field('customers_vat_id', $order->customer['vat_id']);?>
				</td>
			</tr>		
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left" colspan="4">&nbsp;</td>
			</tr>
			<tr class="dataTableRow">
				<td class="dataTableContent" align="left" colspan="4">
				<?php echo '<button type="submit" class="button" onClick="this.blur();">'.BUTTON_UPDATE.'</ button>'; ?>
				</td>
			</tr>
			<tr>
				<td class="dataTableHeadingContent" width="10%" align="left">&nbsp;</td>
				<td class="dataTableHeadingContent" width="30%" align="left">&nbsp;</td>
				<td class="dataTableHeadingContent" width="30%" align="left">&nbsp;</td>
				<td class="dataTableHeadingContent" width="30%" align="left">&nbsp;</td>
			</tr>
		</table>
	</form>
<?php } ?>